{% macro link_block(b, redirect="") %}
    <div class="row d-flex content-block">
        {% if b.icon_url %}
            <div class="ml-2 mr-3 d-flex align-items-center justify-content-center">
                <div class="icon">
                    <img src="{{ static(b.icon_url) }}">
                </div>
            </div>
        {% endif %}
        <div class="content col-lg {% if b.icon_url %}content-with-logo{% endif %}">
            <div class="text">
                <h3>{{ b.text|safe }}</h3>
                {% if b.description %}
                    <p class="description">{{ b.description|safe }}</p>
                {% endif %}
            </div>
            <div class="action">
                {% for action in b.actions %}
                    {% if action.method == "POST" %}
                        <form method="POST" action="{{ action.url }}">
                            {% csrf_token %}
                            {% for name in action.data %}
                                <input type="hidden" name="{{ name }}" value="{{ action.data[name] }}">
                            {% endfor %}
                            <input type="submit" class="btn btn-primary {% if not b.css_class %}btn-inverse{% endif %}" value="{{ action.text }}">
                        <form>
                    {% else %}
                        <a class="btn btn-default"
                            href="{{ action.url }}{% if redirect and not action.no_redirect %}?redirect={{ redirect }}{% endif %}{% if action.hash %}{{ action.hash }}{% endif %}">{{ action.text }}</a>
                    {% endif %}
                {% endfor %}
            </div>
        </div>
    </div>
{% endmacro %}
